/*    */ package com.wzh.bean;
/*    */ 
/*    */ import com.wzh.utils.WebTool;
/*    */ import java.util.List;
/*    */ 
/*    */ public class PageView<T>
/*    */ {
/*    */   private List<T> records;
/*    */   private PageIndex pageindex;
/* 16 */   private int totalpage = 1;
/*    */   private int totalrecords;
/* 20 */   private int currentpage = 1;
/*    */ 
/* 22 */   private int maxresult = 12;
/*    */ 
/*    */   public PageView(int maxresult, int currentpage) {
/* 25 */     this.maxresult = maxresult;
/* 26 */     this.currentpage = currentpage;
/*    */   }
/*    */ 
/*    */   public List<T> getRecords()
/*    */   {
/* 31 */     return this.records;
/*    */   }
/*    */   public void setRecords(List<T> records) {
/* 34 */     this.records = records;
/*    */   }
/*    */   public PageIndex getPageindex() {
/* 37 */     return this.pageindex;
/*    */   }
/*    */ 
/*    */   public long getTotalpage() {
/* 41 */     return this.totalpage;
/*    */   }
/*    */ 
/*    */   public long getTotalrecords() {
/* 45 */     return this.totalrecords;
/*    */   }
/*    */   public void setTotalrecords(int totalrecords) {
/* 48 */     this.totalrecords = totalrecords;
/* 49 */     this.totalpage = (totalrecords % this.maxresult == 0 ? totalrecords / this.maxresult : totalrecords / this.maxresult + 1);
/* 50 */     this.pageindex = WebTool.getPageIndex(this.currentpage, this.totalpage);
/*    */   }
/*    */   public int getCurrentpage() {
/* 53 */     return this.currentpage;
/*    */   }
/*    */ 
/*    */   public int getMaxresult() {
/* 57 */     return this.maxresult;
/*    */   }
/*    */   public void setMaxresult(int maxresult) {
/* 60 */     this.maxresult = maxresult;
/*    */   }
/*    */ }

/* Location:           C:\work\apache-tomcat-7.0.55\webapps\ROOT\WEB-INF\classes\
 * Qualified Name:     com.wzh.bean.PageView
 * JD-Core Version:    0.6.1
 */